home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15651 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 74 6c 69 6e 65 2d 66 64 |Path: ne|tline-fd|
|00000010| 64 69 2e 6a 70 6c 2e 6e | 61 73 61 2e 67 6f 76 21 |di.jpl.n|asa.gov!|
|00000020| 75 73 65 6e 65 74 0a 46 | 72 6f 6d 3a 20 6b 64 71 |usenet.F|rom: kdq|
|00000030| 40 65 6d 6f 72 79 69 2e | 6a 70 6c 2e 6e 61 73 61 |@emoryi.|jpl.nasa|
|00000040| 2e 67 6f 76 20 28 4b 65 | 76 69 6e 20 44 2e 20 51 |.gov (Ke|vin D. Q|
|00000050| 75 69 74 74 29 0a 4e 65 | 77 73 67 72 6f 75 70 73 |uitt).Ne|wsgroups|
|00000060| 3a 20 63 6f 6d 70 2e 6c | 61 6e 67 2e 63 0a 53 75 |: comp.l|ang.c.Su|
|00000070| 62 6a 65 63 74 3a 20 52 | 65 3a 20 70 72 69 6e 74 |bject: R|e: print|
|00000080| 69 6e 67 20 74 6f 20 70 | 72 69 6e 74 65 72 3f 3f |ing to p|rinter??|
|00000090| 3f 0a 44 61 74 65 3a 20 | 53 61 74 2c 20 32 30 20 |?.Date: |Sat, 20 |
|000000a0| 41 70 72 20 31 39 39 36 | 20 32 30 3a 35 31 3a 30 |Apr 1996| 20:51:0|
|000000b0| 38 20 47 4d 54 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |8 GMT.Or|ganizati|
|000000c0| 6f 6e 3a 20 4a 65 74 20 | 50 72 6f 70 75 6c 73 69 |on: Jet |Propulsi|
|000000d0| 6f 6e 20 4c 61 62 6f 72 | 61 74 6f 72 79 0a 4d 65 |on Labor|atory.Me|
|000000e0| 73 73 61 67 65 2d 49 44 | 3a 20 3c 33 31 37 39 34 |ssage-ID|: <31794|
|000000f0| 62 66 36 2e 31 34 36 34 | 34 31 30 33 31 40 6e 65 |bf6.1464|41031@ne|
|00000100| 74 6c 69 6e 65 2d 66 64 | 64 69 2e 6a 70 6c 2e 6e |tline-fd|di.jpl.n|
|00000110| 61 73 61 2e 67 6f 76 3e | 0a 52 65 66 65 72 65 6e |asa.gov>|.Referen|
|00000120| 63 65 73 3a 20 3c 38 32 | 39 35 39 34 33 32 34 2e |ces: <82|9594324.|
|00000130| 37 39 36 40 73 6d 61 73 | 6f 6e 2e 64 65 6d 6f 6e |796@smas|on.demon|
|00000140| 2e 63 6f 2e 75 6b 3e 20 | 3c 34 6b 75 74 6b 75 24 |.co.uk> |<4kutku$|
|00000150| 67 67 6b 40 63 68 65 61 | 74 75 6d 2e 66 72 6f 6e |ggk@chea|tum.fron|
|00000160| 74 69 65 72 6e 65 74 2e | 6e 65 74 3e 20 3c 33 31 |tiernet.|net> <31|
|00000170| 37 35 35 44 39 43 2e 37 | 37 37 35 40 68 6c 70 2e |755D9C.7|775@hlp.|
|00000180| 63 6f 6d 3e 0a 52 65 70 | 6c 79 2d 54 6f 3a 20 6b |com>.Rep|ly-To: k|
|00000190| 64 71 40 65 6d 6f 72 79 | 69 2e 6a 70 6c 2e 6e 61 |dq@emory|i.jpl.na|
|000001a0| 73 61 2e 67 6f 76 0a 4e | 4e 54 50 2d 50 6f 73 74 |sa.gov.N|NTP-Post|
|000001b0| 69 6e 67 2d 48 6f 73 74 | 3a 20 65 6d 6f 72 79 69 |ing-Host|: emoryi|
|000001c0| 2e 6a 70 6c 2e 6e 61 73 | 61 2e 67 6f 76 0a 4d 69 |.jpl.nas|a.gov.Mi|
|000001d0| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|000001e0| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 3a 20 74 65 |Content-|Type: te|
|000001f0| 78 74 2f 70 6c 61 69 6e | 3b 20 63 68 61 72 73 65 |xt/plain|; charse|
|00000200| 74 3d 55 53 2d 41 53 43 | 49 49 0a 43 6f 6e 74 65 |t=US-ASC|II.Conte|
|00000210| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|00000220| 64 69 6e 67 3a 20 37 62 | 69 74 0a 0a 4f 6e 20 57 |ding: 7b|it..On W|
|00000230| 65 64 2c 20 31 37 20 41 | 70 72 20 31 39 39 36 20 |ed, 17 A|pr 1996 |
|00000240| 31 34 3a 30 37 3a 34 30 | 20 2d 30 37 30 30 2c 20 |14:07:40| -0700, |
|00000250| 61 6e 64 72 65 77 20 6b | 65 6e 6e 65 64 79 20 3c |andrew k|ennedy <|
|00000260| 22 61 6e 64 72 65 77 20 | 6b 65 6e 6e 65 64 79 22 |"andrew |kennedy"|
|00000270| 40 68 6c 70 2e 63 6f 6d | 3e 0a 77 72 6f 74 65 3a |@hlp.com|>.wrote:|
|00000280| 0a 3e 20 2f 2a 20 46 69 | 6c 65 6e 61 6d 65 3a 20 |.> /* Fi|lename: |
|00000290| 70 72 69 6e 74 69 74 2e | 63 70 70 20 20 20 20 20 |printit.|cpp |
|000002a0| 57 72 69 74 74 65 6e 20 | 62 79 20 41 2e 20 4b 65 |Written |by A. Ke|
|000002b0| 6e 6e 65 64 79 20 2a 2f | 0a 3e 09 09 09 20 20 2f |nnedy */|.>... /|
|000002c0| 2f 20 53 65 6e 64 20 6f | 75 74 70 75 74 20 64 69 |/ Send o|utput di|
|000002d0| 72 65 63 74 6c 79 20 74 | 6f 20 70 72 69 6e 74 65 |rectly t|o printe|
|000002e0| 72 0a 3e 20 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |r.> #inc|lude <st|
|000002f0| 64 69 6f 2e 68 3e 0a 3e | 20 23 69 6e 63 6c 75 64 |dio.h>.>| #includ|
|00000300| 65 20 3c 73 74 64 6c 69 | 62 2e 68 3e 0a 3e 20 23 |e <stdli|b.h>.> #|
|00000310| 69 6e 63 6c 75 64 65 20 | 3c 63 6f 6e 69 6f 2e 68 |include |<conio.h|
|00000320| 3e 0a 0a 46 6f 72 20 77 | 68 61 74 20 69 74 27 73 |>..For w|hat it's|
|00000330| 20 77 6f 72 74 68 2c 20 | 63 6f 6e 69 6f 2e 63 20 | worth, |conio.c |
|00000340| 69 73 6e 27 74 20 41 4e | 53 49 20 43 2c 20 61 6e |isn't AN|SI C, an|
|00000350| 64 20 69 74 20 61 6c 73 | 6f 20 69 73 6e 27 74 20 |d it als|o isn't |
|00000360| 6d 65 61 6e 69 6e 67 66 | 75 6c 20 74 6f 0a 68 61 |meaningf|ul to.ha|
|00000370| 76 65 20 69 74 20 69 6e | 20 74 68 69 73 20 70 72 |ve it in| this pr|
|00000380| 6f 67 72 61 6d 2e 0a 0a | 3e 0a 3e 20 46 49 4c 45 |ogram...|>.> FILE|
|00000390| 20 2a 70 72 6e 74 3b 0a | 3e 0a 3e 20 76 6f 69 64 | *prnt;.|>.> void|
|000003a0| 20 6d 61 69 6e 28 29 0a | 0a 54 68 69 73 20 69 73 | main().|.This is|
|000003b0| 20 6a 75 73 74 20 70 6c | 61 69 6e 20 77 72 6f 6e | just pl|ain wron|
|000003c0| 67 2e 20 20 49 6e 20 61 | 20 68 6f 73 74 65 64 20 |g. In a| hosted |
|000003d0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 28 69 2e 65 |environm|ent (i.e|
|000003e0| 2e 2c 20 77 68 65 72 65 | 20 74 68 65 72 65 27 73 |., where| there's|
|000003f0| 20 61 6e 0a 6f 70 65 72 | 61 74 69 6e 67 20 73 79 | an.oper|ating sy|
|00000400| 73 74 65 6d 20 6f 72 20 | 49 2f 4f 20 6d 6f 6e 69 |stem or |I/O moni|
|00000410| 74 6f 72 29 20 6d 61 69 | 6e 28 29 20 72 65 74 75 |tor) mai|n() retu|
|00000420| 72 6e 73 20 61 6e 20 69 | 6e 74 2c 20 61 6e 64 20 |rns an i|nt, and |
|00000430| 64 65 66 69 6e 69 6e 67 | 20 69 74 20 61 73 0a 72 |defining| it as.r|
|00000440| 65 74 75 72 6e 69 6e 67 | 20 76 6f 69 64 20 6d 61 |eturning| void ma|
|00000450| 6b 65 73 20 74 68 65 20 | 65 6e 74 69 72 65 20 70 |kes the |entire p|
|00000460| 72 6f 67 72 61 6d 20 75 | 6e 64 65 66 69 6e 65 64 |rogram u|ndefined|
|00000470| 2e 20 20 53 65 65 20 74 | 68 65 20 46 41 51 20 66 |. See t|he FAQ f|
|00000480| 6f 72 20 6d 6f 72 65 0a | 64 65 74 61 69 6c 73 2c |or more.|details,|
|00000490| 20 6f 72 20 73 65 6e 64 | 20 6d 65 20 65 6d 61 69 | or send| me emai|
|000004a0| 6c 20 2d 20 74 68 69 73 | 20 68 61 73 20 62 65 65 |l - this| has bee|
|000004b0| 6e 20 68 61 73 68 65 64 | 20 61 62 6f 75 74 20 74 |n hashed| about t|
|000004c0| 6f 6f 20 6d 61 6e 79 20 | 74 69 6d 65 73 20 61 6c |oo many |times al|
|000004d0| 72 65 61 64 79 0a 6f 6e | 20 74 68 69 73 20 67 72 |ready.on| this gr|
|000004e0| 6f 75 70 2e 0a 0a 0a 3e | 20 7b 0a 3e 20 20 20 20 |oup....>| {.> |
|000004f0| 70 72 6e 74 20 3d 20 66 | 6f 70 65 6e 28 22 50 52 |prnt = f|open("PR|
|00000500| 4e 22 2c 20 22 77 22 29 | 3b 20 20 20 2f 2a 20 4c |N", "w")|; /* L|
|00000510| 54 50 31 20 77 6f 75 6c | 64 20 61 6c 73 6f 20 77 |TP1 woul|d also w|
|00000520| 6f 72 6b 20 2a 2f 0a 0a | 53 69 67 68 2c 20 69 74 |ork */..|Sigh, it|
|00000530| 27 73 20 61 6e 20 4d 53 | 2d 44 4f 53 69 73 6d 2c |'s an MS|-DOSism,|
|00000540| 20 61 6e 64 20 73 6f 20 | 69 73 6e 27 74 20 72 65 | and so |isn't re|
|00000550| 61 6c 6c 79 20 61 70 70 | 72 6f 70 72 69 61 74 65 |ally app|ropriate|
|00000560| 20 6f 6e 20 74 68 69 73 | 20 67 72 6f 75 70 2c 20 | on this| group, |
|00000570| 62 75 74 0a 74 68 61 74 | 20 72 65 61 6c 6c 79 20 |but.that| really |
|00000580| 73 68 6f 75 6c 64 20 62 | 65 20 22 77 62 22 20 74 |should b|e "wb" t|
|00000590| 6f 20 6f 70 65 6e 20 74 | 68 65 20 70 72 69 6e 74 |o open t|he print|
|000005a0| 65 72 20 69 6e 20 62 69 | 6e 61 72 79 20 6d 6f 64 |er in bi|nary mod|
|000005b0| 65 2e 20 20 50 65 6f 70 | 6c 65 20 77 68 6f 0a 77 |e. Peop|le who.w|
|000005c0| 72 69 74 65 20 64 69 72 | 65 63 74 6c 79 20 74 6f |rite dir|ectly to|
|000005d0| 20 74 68 65 20 70 72 69 | 6e 74 65 72 20 6f 66 74 | the pri|nter oft|
|000005e0| 65 6e 20 6d 61 6b 65 20 | 75 73 65 20 6f 66 20 73 |en make |use of s|
|000005f0| 70 65 63 69 61 6c 20 67 | 72 61 70 68 69 63 73 20 |pecial g|raphics |
|00000600| 6f 72 20 6f 74 68 65 72 | 0a 63 68 61 72 61 63 74 |or other|.charact|
|00000610| 65 72 69 73 74 69 63 73 | 20 6f 66 20 74 68 65 20 |eristics| of the |
|00000620| 70 72 69 6e 74 65 72 3b | 20 74 6f 20 64 6f 20 73 |printer;| to do s|
|00000630| 6f 20 6f 66 74 65 6e 20 | 72 65 71 75 69 72 65 73 |o often |requires|
|00000640| 20 74 68 65 20 74 72 61 | 6e 73 6d 69 73 73 69 6f | the tra|nsmissio|
|00000650| 6e 20 6f 66 0a 62 69 6e | 61 72 79 20 64 61 74 61 |n of.bin|ary data|
|00000660| 20 73 75 63 68 20 61 73 | 20 4e 55 4c 73 20 28 77 | such as| NULs (w|
|00000670| 68 69 63 68 20 6d 69 67 | 68 74 20 62 65 20 64 69 |hich mig|ht be di|
|00000680| 73 63 61 72 64 65 64 29 | 20 61 6e 64 20 43 54 52 |scarded)| and CTR|
|00000690| 4c 2d 5a 73 2c 20 77 68 | 69 63 68 20 77 69 6c 6c |L-Zs, wh|ich will|
|000006a0| 0a 63 61 75 73 65 20 74 | 68 65 20 73 74 72 65 61 |.cause t|he strea|
|000006b0| 6d 20 74 6f 20 62 65 20 | 63 6c 6f 73 65 64 20 28 |m to be |closed (|
|000006c0| 73 69 6e 63 65 20 69 74 | 27 73 20 74 68 65 20 45 |since it|'s the E|
|000006d0| 4f 46 20 69 6e 64 69 63 | 61 74 69 6f 6e 20 66 6f |OF indic|ation fo|
|000006e0| 72 20 74 65 78 74 20 73 | 74 72 65 61 6d 73 0a 66 |r text s|treams.f|
|000006f0| 6f 72 20 4d 53 2d 44 4f | 53 2e 0a 0a 46 75 72 74 |or MS-DO|S...Furt|
|00000700| 68 65 72 2c 20 4d 53 2d | 44 4f 53 20 63 6f 6d 70 |her, MS-|DOS comp|
|00000710| 69 6c 65 72 73 20 70 72 | 6f 76 69 64 65 20 73 74 |ilers pr|ovide st|
|00000720| 64 70 72 6e 20 61 73 20 | 74 68 65 20 46 49 4c 45 |dprn as |the FILE|
|00000730| 2a 20 61 6c 72 65 61 64 | 79 20 6f 70 65 6e 65 64 |* alread|y opened|
|00000740| 20 66 6f 72 0a 70 72 69 | 6e 74 69 6e 67 2e 20 20 | for.pri|nting. |
|00000750| 49 20 64 6f 6e 27 74 20 | 6b 6e 6f 77 20 69 66 20 |I don't |know if |
|00000760| 69 74 27 73 20 69 6e 20 | 62 69 6e 61 72 79 20 6d |it's in |binary m|
|00000770| 6f 64 65 2c 20 68 6f 77 | 65 76 65 72 2e 20 20 53 |ode, how|ever. S|
|00000780| 69 6e 63 65 20 74 68 69 | 73 20 69 73 0a 4d 53 2d |ince thi|s is.MS-|
|00000790| 44 4f 53 2c 20 69 74 20 | 70 72 6f 62 61 62 6c 79 |DOS, it |probably|
|000007a0| 20 69 73 6e 27 74 2e 0a | 0a 0a 3e 20 20 20 20 66 | isn't..|..> f|
|000007b0| 70 72 69 6e 74 66 28 70 | 72 6e 74 2c 20 22 20 20 |printf(p|rnt, " |
|000007c0| 20 20 20 54 68 69 73 20 | 6f 75 74 70 75 74 20 77 | This |output w|
|000007d0| 61 73 20 73 65 6e 74 20 | 74 6f 20 74 68 65 20 70 |as sent |to the p|
|000007e0| 72 69 6e 74 65 72 2e 22 | 29 3b 0a 3e 20 20 20 20 |rinter."|);.> |
|000007f0| 66 63 6c 6f 73 65 28 70 | 72 6e 74 29 3b 0a 3e 20 |fclose(p|rnt);.> |
|00000800| 7d 0a 0a 41 6e 64 20 68 | 65 72 65 27 73 20 77 68 |}..And h|ere's wh|
|00000810| 65 72 65 20 79 6f 75 27 | 6c 6c 20 67 65 74 20 74 |ere you'|ll get t|
|00000820| 68 65 20 77 61 72 6e 69 | 6e 67 20 61 62 6f 75 74 |he warni|ng about|
|00000830| 20 6e 6f 74 20 72 65 74 | 75 72 6e 69 6e 67 20 61 | not ret|urning a|
|00000840| 20 76 61 6c 75 65 2e 20 | 20 59 6f 75 0a 73 68 6f | value. | You.sho|
|00000850| 75 6c 64 20 75 73 65 20 | 65 69 74 68 65 72 20 65 |uld use |either e|
|00000860| 78 69 74 28 20 45 58 49 | 54 5f 53 55 43 43 45 53 |xit( EXI|T_SUCCES|
|00000870| 53 20 29 20 6f 72 20 72 | 65 74 75 72 6e 20 45 58 |S ) or r|eturn EX|
|00000880| 49 54 5f 53 55 43 43 45 | 53 53 20 61 74 20 74 68 |IT_SUCCE|SS at th|
|00000890| 65 20 65 6e 64 20 6f 66 | 0a 6d 61 69 6e 2e 20 20 |e end of|.main. |
|000008a0| 54 68 65 73 65 20 61 72 | 65 20 66 6f 72 20 61 6c |These ar|e for al|
|000008b0| 6c 20 69 6e 74 65 6e 74 | 73 20 61 6e 64 20 70 75 |l intent|s and pu|
|000008c0| 72 70 6f 73 65 73 20 74 | 68 65 20 73 61 6d 65 20 |rposes t|he same |
|000008d0| 74 68 69 6e 67 20 28 61 | 6c 74 68 6f 75 67 68 20 |thing (a|lthough |
|000008e0| 74 68 65 72 65 0a 61 72 | 65 20 73 6f 6d 65 20 65 |there.ar|e some e|
|000008f0| 73 6f 74 65 72 69 63 20 | 64 69 66 66 65 72 65 6e |soteric |differen|
|00000900| 63 65 73 29 2e 0a 0a 41 | 67 61 69 6e 2c 20 61 6e |ces)...A|gain, an|
|00000910| 79 20 71 75 65 73 74 69 | 6f 6e 2c 20 63 6f 6d 6d |y questi|on, comm|
|00000920| 65 6e 74 2c 20 6f 72 20 | 73 6e 69 64 65 20 72 65 |ent, or |snide re|
|00000930| 6d 61 72 6b 73 20 73 68 | 6f 75 6c 64 20 62 65 20 |marks sh|ould be |
|00000940| 73 65 6e 74 20 74 6f 20 | 6d 65 20 76 69 61 20 65 |sent to |me via e|
|00000950| 6d 61 69 6c 2e 0a 0a 2d | 2d 20 0a 23 69 6e 63 6c |mail...-|- .#incl|
|00000960| 75 64 65 20 3c 73 74 61 | 6e 64 61 72 64 5f 64 69 |ude <sta|ndard_di|
|00000970| 73 63 6c 61 69 6d 65 72 | 2e 68 3e 20 20 20 20 20 |sclaimer|.h> |
|00000980| 20 20 20 20 20 20 20 20 | 20 20 20 20 68 74 74 70 | | http|
|00000990| 3a 2f 2f 65 6d 6f 72 79 | 69 2e 6a 70 6c 2e 6e 61 |://emory|i.jpl.na|
|000009a0| 73 61 2e 67 6f 76 2f 0a | 20 5f 0a 4b 65 76 69 6e |sa.gov/.| _.Kevin|
|000009b0| 20 44 20 51 75 69 74 74 | 20 20 55 53 41 20 39 31 | D Quitt| USA 91|
|000009c0| 33 35 31 2d 34 34 35 34 | 20 20 20 20 20 20 20 20 |351-4454| |
|000009d0| 20 20 20 39 36 2e 33 37 | 25 20 6f 66 20 61 6c 6c | 96.37|% of all|
|000009e0| 20 73 74 61 74 69 73 74 | 69 63 73 20 61 72 65 20 | statist|ics are |
|000009f0| 6d 61 64 65 20 75 70 0a | |made up.| |
+--------+-------------------------+-------------------------+--------+--------+